using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using UnityEngine.UI;
using UnityEngine.EventSystems;

public class StartPanel : MonoBehaviour
{
    public Image hand;
    public Button setButton;
    public GameManagerTop manager;
    public GameObject setPanel, gamePanel;

    void Start()
    {
        Tweener tweener = hand.rectTransform.DOLocalMoveX(310, 2f);
        tweener.SetEase(Ease.Linear);
        tweener.SetLoops(-1, LoopType.Yoyo);
        //PlayerPrefs.DeleteAll();
    }

    void Update()
    {
        if (Input.GetMouseButtonDown(0) && !EventSystem.current.IsPointerOverGameObject())
        {
            gamePanel.SetActive(true);
            Destroy(this.gameObject);
            manager.enabled = true;
        }
    }

    public void OnSetClick()
    {
        setPanel.SetActive(true);
    }
}
